<template>
  <el-card>
    <div class="top">{{ title }}</div>
    <div class="count">{{ count }}</div>
    <div class="main">
      <!-- 插槽 -->
      <slot name="main"></slot>
    </div>
    <div class="line"></div>
    <div class="buttom">
      <slot name="buttom"></slot>
    </div>
  </el-card>
</template>

<script setup lang="ts">
// 通过props接收
const props = defineProps<{
  title: string
  count: number
}>()
</script>

<style lang="scss" scoped>
.top {
  font-size: 12px;
  color: #bbb;
}
.count {
  font-size: 26px;
  margin-top: 5px;
  letter-spacing: 1px;
}
.main {
  height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.line {
  height: 2px;
  width: 100%;
  background-color: #aaa;
  margin: 10px 0;
}
.buttom {
  font-size: 12px;
  color: #bbb;
}
</style>
